package jvm;

/**
 * @Author: ideaAdmin
 * TODO:
 * Date: 2022/2/12:10:46
 * Description:
 */

public class FirstLoadFather {

    static class Father {
        public static int A = 1;

        static {
            A = 2;
        }
    }

    static class Son extends Father {
        //访问子类的时候 会先加载其父类
        public static int B = A;
    }

    public static void main(String[] args) {
        System.out.println(Son.B);
    }
}
